﻿<UserControl x:Class="Topics.Radical.Presentation.Effects.EffectView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d"
	  xmlns:effects="http://schemas.topics.it/wpf/radical/windows/effects"
      d:DesignHeight="238" d:DesignWidth="394">
    <UserControl.Resources>
        <effects:GrayscaleEffect x:Key="ge" />
        <Style TargetType="Image">
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Effect" Value="{StaticResource ResourceKey=ge}" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <Grid>

        <CheckBox IsChecked="{Binding Path=IsChecked}" 
				  Content="Enabled" 
				  Height="16" 
				  HorizontalAlignment="Left" 
				  Margin="98,164,0,0" 
				  VerticalAlignment="Top" />
        <Button IsEnabled="{Binding Path=IsChecked}" Height="23" HorizontalAlignment="Left" Margin="149,69,0,0" Name="button1" VerticalAlignment="Top" Width="75">
            <Button.Content>
                <StackPanel Orientation="Horizontal">
                    <Image Stretch="Uniform" Width="32" 
						   Source="/Radical.Samples;component/Presentation/Effects/Blender.png" />
                    <TextBlock Margin="3" Text="Button" />
                </StackPanel>
            </Button.Content>
        </Button>
    </Grid>
</UserControl>
